from django.conf.urls import url
from . import views
from rest_framework.routers import DefaultRouter
urlpatterns = [
# 商品列表
 url(r'^categories/(?P<category_id>\d+)/skus/', views.SKUListView.as_view()),
]


# 获得搜索的结果
router = DefaultRouter()
router.register('skus/search', views.SKUSearchViewSet, base_name='skus_search')

...

urlpatterns += router.urls